package com.jiyun.passenger.controller;

import com.jiyun.passenger.service.UserPassengerService;
import com.jiyun.pojo.UserPassenger;
import com.jiyun.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/passenger")
public class UserPassengerController {
    @Autowired
    UserPassengerService userPassengerService;
    @GetMapping("/findAll")
    public Result findAll() {
        List<UserPassenger> passengers = userPassengerService.findAll();
        return Result.ok(passengers);
    }
}
